/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						       bitmap_group_window.h

	$Header: /game/bitmap_group_window.h $

	$NoKeywords: $

 ************************************************************************/
#ifndef BITMAP_GROUP_WINDOW_H_INCLUDED
#define BITMAP_GROUP_WINDOW_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "bitmap_group_ptr.h"
#include "game_window.h"

class t_bitmap_layer;

class t_bitmap_group_window : public t_window
{
public:
	t_bitmap_group_window( t_bitmap_group_ptr const& bitmaps, t_screen_point point, 
		                   int frame = 0, t_window* parent = 0 );
	t_bitmap_group_window( t_bitmap_group_ptr const& bitmaps, t_screen_point point, 
		                   std::string const& layer_name, t_window* parent = 0 );
	t_bitmap_group_ptr  get_bitmaps() const;
	int					get_frame() const;
    int					get_frame_count() const;
	virtual bool		is_contained( t_screen_point point ) const; 
	virtual void		paint( t_paint_surface& paint_surface );
	void				set_bitmaps( t_bitmap_group_ptr const& bitmaps, int frame = 0 );
	void				set_frame( std::string const& name );
	void				set_frame( int frame );
	void				set_size_from_frame();
protected:
	t_bitmap_group_ptr    m_bitmaps;
	int                   m_current_frame;
	t_screen_point        m_origin;
	t_bitmap_layer const* m_bitmap;
};

inline t_bitmap_group_ptr t_bitmap_group_window::get_bitmaps() const
{
	return m_bitmaps;
}

inline int t_bitmap_group_window::get_frame() const
{
	return m_current_frame;
}


#endif // BITMAP_GROUP_WINDOW_H_INCLUDED